

<!DOCTYPE html>
<html lang="zh-CN" data-default-color-scheme=auto>



<head>
  <meta charset="UTF-8">
  <link rel="apple-touch-icon" sizes="76x76" href="/img/favicon.png">
  <link rel="icon" href="/img/favicon.png">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0, shrink-to-fit=no">
  <meta http-equiv="x-ua-compatible" content="ie=edge">
  
  <meta name="theme-color" content="#2f4154">
  <meta name="author" content="Cheney">
  <meta name="keywords" content="Coding">
  
    <meta name="description" content="给出了遍历二叉树的前序序列和中序序列，则可以构造出唯一的一棵二叉树。">
<meta property="og:type" content="article">
<meta property="og:title" content="唯一的确定一棵二叉树">
<meta property="og:url" content="https://cheney822.gitee.io/2020/12/08/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84%E5%AE%9E%E9%AA%8C--%E5%94%AF%E4%B8%80%E7%9A%84%E7%A1%AE%E5%AE%9A%E4%B8%80%E6%A3%B5%E4%BA%8C%E5%8F%89%E6%A0%91/index.html">
<meta property="og:site_name" content="Cheney blog">
<meta property="og:description" content="给出了遍历二叉树的前序序列和中序序列，则可以构造出唯一的一棵二叉树。">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://imgbed.cheney.cc/picgo/4cbdc3e6bcc44b779a6306733fbaed8e-20220405210849553.png">
<meta property="og:image" content="https://imgbed.cheney.cc/picgo/2a3d9b7ef8624e62a06112ae021efa83-20220405210849616.png">
<meta property="og:image" content="https://imgbed.cheney.cc/picgo/e2eb32e84499443495e162ffcc934c16-20220405210849655.png">
<meta property="og:image" content="https://imgbed.cheney.cc/picgo/watermark,type_ZHJvaWRzYW5zZmFsbGJhY2s,shadow_50,text_Q1NETiBAQ2hlbmV5ODIy,size_17,color_FFFFFF,t_70,g_se,x_16-20220405210849694.png">
<meta property="og:image" content="https://imgbed.cheney.cc/picgo/a55b164dd90342b9ac8bfa826a4e2b20-20220405210849733.png">
<meta property="article:published_time" content="2020-12-07T19:14:00.000Z">
<meta property="article:modified_time" content="2022-04-05T13:14:28.799Z">
<meta property="article:author" content="Cheney">
<meta property="article:tag" content="二叉树">
<meta property="article:tag" content="C++">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:image" content="https://imgbed.cheney.cc/picgo/4cbdc3e6bcc44b779a6306733fbaed8e-20220405210849553.png">
  
  
  <title>唯一的确定一棵二叉树 - Cheney blog</title>

  <link  rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4/dist/css/bootstrap.min.css" />


  <link  rel="stylesheet" href="https://cdn.jsdelivr.net/npm/github-markdown-css@4/github-markdown.min.css" />
  <link  rel="stylesheet" href="https://cdn.jsdelivr.net/npm/hint.css@2/hint.min.css" />

  
    
    
      
      <link  rel="stylesheet" href="https://cdn.jsdelivr.net/npm/highlight.js@10/styles/github-gist.min.css" />
    
  

  
    <link  rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3/dist/jquery.fancybox.min.css" />
  


<!-- 主题依赖的图标库，不要自行修改 -->

<link rel="stylesheet" href="//at.alicdn.com/t/font_1749284_ba1fz6golrf.css">



<link rel="stylesheet" href="//at.alicdn.com/t/font_1736178_lbnruvf0jn.css">


<link  rel="stylesheet" href="/css/main.css" />

<!-- 自定义样式保持在最底部 -->


  <script id="fluid-configs">
    var Fluid = window.Fluid || {};
    var CONFIG = {"hostname":"cheney822.gitee.io","root":"/","version":"1.8.14","typing":{"enable":true,"typeSpeed":70,"cursorChar":"_","loop":false},"anchorjs":{"enable":true,"element":"h1,h2,h3,h4,h5,h6","placement":"right","visible":"hover","icon":""},"progressbar":{"enable":true,"height_px":3,"color":"#29d","options":{"showSpinner":false,"trickleSpeed":100}},"copy_btn":true,"image_zoom":{"enable":true,"img_url_replace":["",""]},"toc":{"enable":true,"headingSelector":"h1,h2,h3,h4,h5,h6","collapseDepth":1},"lazyload":{"enable":true,"loading_img":"/img/loading.gif","onlypost":false,"offset_factor":2},"web_analytics":{"enable":false,"baidu":null,"google":null,"gtag":null,"tencent":{"sid":null,"cid":null},"woyaola":null,"cnzz":null,"leancloud":{"app_id":null,"app_key":null,"server_url":null,"path":"window.location.pathname","ignore_local":false}},"search_path":"/local-search.xml"};
  </script>
  <script  src="/js/utils.js" ></script>
  <script  src="/js/color-schema.js" ></script>
<meta name="generator" content="Hexo 5.4.1"></head>


<body>
  <header style="height: 70vh;">
    <nav id="navbar" class="navbar fixed-top  navbar-expand-lg navbar-dark scrolling-navbar">
  <div class="container">
    <a class="navbar-brand" href="/">
      <strong>Cheney Blog</strong>
    </a>

    <button id="navbar-toggler-btn" class="navbar-toggler" type="button" data-toggle="collapse"
            data-target="#navbarSupportedContent"
            aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
      <div class="animated-icon"><span></span><span></span><span></span></div>
    </button>

    <!-- Collapsible content -->
    <div class="collapse navbar-collapse" id="navbarSupportedContent">
      <ul class="navbar-nav ml-auto text-center">
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/">
                <i class="iconfont icon-home-fill"></i>
                首页
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/archives/">
                <i class="iconfont icon-archive-fill"></i>
                归档
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/categories/">
                <i class="iconfont icon-category-fill"></i>
                分类
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/tags/">
                <i class="iconfont icon-tags-fill"></i>
                标签
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/about/">
                <i class="iconfont icon-user-fill"></i>
                关于
              </a>
            </li>
          
        
        
          <li class="nav-item" id="search-btn">
            <a class="nav-link" target="_self" href="javascript:;" data-toggle="modal" data-target="#modalSearch" aria-label="Search">
              &nbsp;<i class="iconfont icon-search"></i>&nbsp;
            </a>
          </li>
        
        
          <li class="nav-item" id="color-toggle-btn">
            <a class="nav-link" target="_self" href="javascript:;" aria-label="Color Toggle">&nbsp;<i
                class="iconfont icon-dark" id="color-toggle-icon"></i>&nbsp;</a>
          </li>
        
      </ul>
    </div>
  </div>
</nav>

    <div class="banner" id="banner" parallax=true
         style="background: url('https://imgbed.cheney.cc/Blog_config/default.png') no-repeat center center;
           background-size: cover;">
      <div class="full-bg-img">
        <div class="mask flex-center" style="background-color: rgba(0, 0, 0, 0.3)">
          <div class="page-header text-center fade-in-up">
            <span class="h2" id="subtitle" title="唯一的确定一棵二叉树">
              
            </span>

            
              <div class="mt-3">
  
  
    <span class="post-meta">
      <i class="iconfont icon-date-fill" aria-hidden="true"></i>
      <time datetime="2020-12-08 03:14" pubdate>
        2020年12月8日 凌晨
      </time>
    </span>
  
</div>

<div class="mt-1">
  
    <span class="post-meta mr-2">
      <i class="iconfont icon-chart"></i>
      2.7k 字
    </span>
  

  
    <span class="post-meta mr-2">
      <i class="iconfont icon-clock-fill"></i>
      
      
      14 分钟
    </span>
  

  
  
</div>

            
          </div>

          
        </div>
      </div>
    </div>
  </header>

  <main>
    
      

<div class="container-fluid nopadding-x">
  <div class="row nomargin-x">
    <div class="d-none d-lg-block col-lg-2"></div>
    <div class="col-lg-8 nopadding-x-md">
      <div class="container nopadding-x-md" id="board-ctn">
        <div class="py-5" id="board">
          <article class="post-content mx-auto">
            <!-- SEO header -->
            <h1 style="display: none">唯一的确定一棵二叉树</h1>
            
            <div class="markdown-body">
              <h1 id="一、问题描述"><a href="#一、问题描述" class="headerlink" title="一、问题描述"></a>一、问题描述</h1><p>如果给出了遍历二叉树的前序序列和中序序列，则可以构造出唯一的一棵二叉树。试编写实现上述功能的程序。</p>
<p>【基本要求】<br>已知一棵二叉树的前序和中序序列，试设计完成下列任务的一个算法：<br>（1）构造一棵二叉树；<br>（2）证明构造正确（即分别以前序和中序遍历该树，将得到的结果与给出的序列进行比较）。<br>（3）对该二叉树进行后序遍历，输出后序遍历序列。<br>（4）用凹入法输出该二叉树。</p>
<p>【测试数据】<br>（1）前序序列为ABDEGCFHIJ，中序序列为DBGEAHFIJC。<br>（2）前序序列为-<em>+abc/de，中序序列为a+b</em>c-d/e 。</p>
<p>【拓展内容】<br>由原表达式构造二叉树。测试数据(a+b) ×c-d/e</p>
<h1 id="二、需求分析"><a href="#二、需求分析" class="headerlink" title="二、需求分析"></a>二、需求分析</h1><p>需要设计有以下几个功能的程序：</p>
<ul>
<li>1：由已知的前序和后续序列构建二叉树</li>
<li>2：分别用三种序列（前中后）输出二叉树</li>
<li>3：用凹入法输出二叉树</li>
</ul>
<p>输入：分别输入前序序列和后序序列</p>
<p>输出：四种方法分别输出该二叉树</p>
<p>拓展功能：根据输入的中缀表达式(四则运算)，创建二叉树</p>
<h1 id="三、设计"><a href="#三、设计" class="headerlink" title="三、设计"></a>三、设计</h1><h2 id="3-1-概要设计"><a href="#3-1-概要设计" class="headerlink" title="3.1 概要设计"></a>3.1 概要设计</h2><p>（1）数据结构设计<br>根据题目要求易知本程序采用树结构作为基本结构，但在操作过程中也要用字符数组或者字符串类型储存计算过程中的表达式，考虑到需要多次使用截取部分字符串的</p>
<p>（2）算法设计<br>根据前序遍历的特点, 知前序序列(PreS)的首个元素(PreS[0])为二叉树的根(root),  然后在中序序列(InS)中查找此根(root),  根据中序遍历特点, 知在查找到的根(root) 前边的序列为根的左子树的中序遍历序列,  后边的序列为根的右子树的中序遍历序列。 设在中序遍历序列(InS)根前边有left个元素. 则在前序序列(PreS)中, 紧跟着根(root)的left个元素序列(即PreS[1…left]) 为根的左子树的前序遍历序列, 在后边的为根的右子树的前序遍历序列.而构造左子树问题其实跟构造整个二叉树问题一样，只是此时前序序列为PreS[1…left]), 中序序列为InS[0…left-1], 分别为原序列的子串, 构造右子树同样, 显然可以用递归方法解决。</p>
<p>建立完二叉树之后，很容易建立三个函数用递归的算法遍历输出已经建立的二叉树的前中后三种序列，对于凹入法，可以基于前序遍历输出，在输出的时候控制格式，即根据层高判断字符前面输出的空格数，在字符后输出与空格对应的点或其他字符，保持总的字符数不变。<br><img src="https://imgbed.cheney.cc/picgo/4cbdc3e6bcc44b779a6306733fbaed8e-20220405210849553.png" srcset="/img/loading.gif" lazyload alt="在这里插入图片描述"></p>
<p>  </p>
<h2 id="3-2-详细设计"><a href="#3-2-详细设计" class="headerlink" title="3.2 详细设计"></a>3.2 详细设计</h2><h3 id="1-类的设计"><a href="#1-类的设计" class="headerlink" title="1.类的设计"></a>1.类的设计</h3><p>由于本算法基于树来实现，首先要设计树的节点类，包括数据域和指针域，指针域包括左子树和右子树。树类包括一个指向树的节点类的指针和其他若干函数</p>
<h3 id="2-遍历函数设计"><a href="#2-遍历函数设计" class="headerlink" title="2.    遍历函数设计"></a>2.    遍历函数设计</h3><figure class="highlight cpp"><table><tr><td class="gutter"><div class="code-wrapper"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></div></td><td class="code"><pre><code class="hljs cpp"><span class="hljs-function"><span class="hljs-type">void</span> <span class="hljs-title">PreOrderTraverse</span><span class="hljs-params">(BiNode* t)</span></span><br><span class="hljs-function"></span>&#123;<br>	<span class="hljs-keyword">if</span> (t == <span class="hljs-literal">NULL</span>) <span class="hljs-keyword">return</span>;	<br>		cout &lt;&lt; t-&gt;Data;<br>		<span class="hljs-built_in">PreOrderTraverse</span>(t-&gt;L_Child);<br>		<span class="hljs-built_in">PreOrderTraverse</span>(t-&gt;R_Child);<br>&#125;<span class="hljs-comment">//前序遍历</span><br></code></pre></td></tr></table></figure>

<p>遍历的算法如上，基于递归的思想，首先把t等于NULL作为递归出口<br>输出当前数据之后，依次递归访问左孩子和右孩子<br>对于中序和后续遍历仅需改变输出语句与访问左右孩子的顺序</p>
<h3 id="3-创建二叉树函数设计"><a href="#3-创建二叉树函数设计" class="headerlink" title="3.    创建二叉树函数设计"></a>3.    创建二叉树函数设计</h3><p>void CreateBiTree(BiNode* t, string Pres, string Ins)//t为要建立的二叉树,pres和ins分别为前序和中序序列</p>
<figure class="highlight cpp"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br></pre></td><td class="code"><pre><code class="hljs cpp">&#123;<br>	<span class="hljs-keyword">if</span> (Pres.<span class="hljs-built_in">length</span>() == <span class="hljs-number">0</span>) &#123; t = <span class="hljs-literal">NULL</span>; <span class="hljs-keyword">return</span>; &#125;<span class="hljs-comment">//递归出口：当前前序序列长度为零</span><br><br>	<span class="hljs-comment">//前序序列的第一位Pres[0]即为根</span><br>	<span class="hljs-type">int</span> Location = Ins.<span class="hljs-built_in">find</span>(Pres[<span class="hljs-number">0</span>]);<span class="hljs-comment">//根在中序序列中的位置，以此位置把中序序列分开</span><br>	string L_In = Ins.<span class="hljs-built_in">substr</span>(<span class="hljs-number">0</span>, Location);<span class="hljs-comment">//左孩子的中序序列</span><br>	string R_In = Ins.<span class="hljs-built_in">substr</span>(Location + <span class="hljs-number">1</span>);<span class="hljs-comment">//右孩子的中序序列</span><br>	<span class="hljs-type">int</span> L_length = L_In.<span class="hljs-built_in">length</span>();<span class="hljs-comment">//左孩子的长度即左子树节点个数</span><br><br>	<span class="hljs-comment">//在原前序序列中 按顺序 提取出子树节点个数个字符  当作对应子树新的前序序列</span><br>	string L_Pre = Pres.<span class="hljs-built_in">substr</span>(<span class="hljs-number">1</span>, L_length);<span class="hljs-comment">//左孩子的前序序列</span><br>	string R_Pre = Pres.<span class="hljs-built_in">substr</span>(<span class="hljs-number">1</span> + L_length);<span class="hljs-comment">//右孩子的前序序列</span><br><br>	t-&gt;Data=Pres[<span class="hljs-number">0</span>];<span class="hljs-comment">//当前前序序列的首位赋给t的data</span><br><br>	<span class="hljs-keyword">if</span>(L_Pre.<span class="hljs-built_in">length</span>())&#123;<br>	t-&gt;L_Child = <span class="hljs-keyword">new</span> <span class="hljs-built_in">BiNode</span>();<br>	<span class="hljs-built_in">CreateBiTree</span>(t-&gt;L_Child, L_Pre, L_In);<span class="hljs-comment">//递归创建左孩子</span><br>	&#125;<br>	<span class="hljs-keyword">if</span>(R_Pre.<span class="hljs-built_in">length</span>())&#123;<br>	t-&gt;R_Child = <span class="hljs-keyword">new</span> <span class="hljs-built_in">BiNode</span>();<br>	<span class="hljs-built_in">CreateBiTree</span>(t-&gt;R_Child, R_Pre, R_In);<span class="hljs-comment">//递归创建右孩子</span><br>	&#125;<br>&#125;<br></code></pre></td></tr></table></figure>

<p>创建二叉树的算法如上，表示图如下： <img src="https://imgbed.cheney.cc/picgo/2a3d9b7ef8624e62a06112ae021efa83-20220405210849616.png" srcset="/img/loading.gif" lazyload alt="在这里插入图片描述"></p>
<h3 id="4-凹入法输出设计"><a href="#4-凹入法输出设计" class="headerlink" title="4.凹入法输出设计"></a>4.凹入法输出设计</h3><figure class="highlight cpp"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><code class="hljs cpp"><span class="hljs-function"><span class="hljs-type">void</span> <span class="hljs-title">Concave</span><span class="hljs-params">(BiNode* p, string ss, string RR)</span></span><br><span class="hljs-function"></span>&#123;<br>	<span class="hljs-keyword">if</span> (p == <span class="hljs-literal">NULL</span>)   <span class="hljs-keyword">return</span>; <span class="hljs-comment">//递归出口</span><br><br>	ss += <span class="hljs-string">&quot;   &quot;</span>;<span class="hljs-comment">//用来控制格式，每次多输出三个空格</span><br>	RR = RR.<span class="hljs-built_in">substr</span>(<span class="hljs-number">3</span>);<span class="hljs-comment">//用来控制格式,字符后输出特定的符号，并保证最后一位对齐</span><br>	cout &lt;&lt; ss &lt;&lt; p-&gt;Data &lt;&lt; RR &lt;&lt; endl;<br>	<span class="hljs-built_in">Concave</span>(p-&gt;L_Child, ss,RR);<br>	<span class="hljs-built_in">Concave</span>(p-&gt;R_Child, ss,RR);<br>&#125;<br></code></pre></td></tr></table></figure>

<p>凹入法打印二叉树的算法如上：主函数调用的语句如下<br>Concave(TreeRoot, “”, “………………………………..”);</p>
<h1 id="四、测试数据及测试结果："><a href="#四、测试数据及测试结果：" class="headerlink" title="四、测试数据及测试结果："></a>四、测试数据及测试结果：</h1><p>测试输入：前序序列为<em>ab，中序序列为a</em>b 。<br>测试目的：设计该输入的目的在于测试程序在哪方面可能存在漏洞；<br>实际输出：经检验该输出符合预期的要求<img src="https://imgbed.cheney.cc/picgo/e2eb32e84499443495e162ffcc934c16-20220405210849655.png" srcset="/img/loading.gif" lazyload alt="在这里插入图片描述"></p>
<p>测试输入：前序序列为ABDEGCFHIJ，中序序列为DBGEAHFIJC。<br>测试目的：设计该输入的目的在于测试程序在哪方面可能存在漏洞；<br>实际输出：经检验该输出符合预期的要求</p>
<p><img src="https://imgbed.cheney.cc/picgo/watermark,type_ZHJvaWRzYW5zZmFsbGJhY2s,shadow_50,text_Q1NETiBAQ2hlbmV5ODIy,size_17,color_FFFFFF,t_70,g_se,x_16-20220405210849694.png" srcset="/img/loading.gif" lazyload alt="img"></p>
<p>测试输入：前序序列为-<em>+abc/de，中序序列为a+b</em>c-d/e 。<br>测试目的：设计该输入的目的在于测试程序在哪方面可能存在漏洞；<br>实际输出：经检验该输出符合预期的要求<br> <img src="https://imgbed.cheney.cc/picgo/a55b164dd90342b9ac8bfa826a4e2b20-20220405210849733.png" srcset="/img/loading.gif" lazyload alt="在这里插入图片描述"></p>

            </div>
            <hr>
            <div>
              <div class="post-metas mb-3">
                
                  <div class="post-meta mr-3">
                    <i class="iconfont icon-category"></i>
                    
                      <a class="hover-with-bg" href="/categories/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84/">数据结构</a>
                    
                  </div>
                
                
                  <div class="post-meta">
                    <i class="iconfont icon-tags"></i>
                    
                      <a class="hover-with-bg" href="/tags/%E4%BA%8C%E5%8F%89%E6%A0%91/">二叉树</a>
                    
                      <a class="hover-with-bg" href="/tags/C/">C++</a>
                    
                  </div>
                
              </div>
              
                <p class="note note-warning">
                  
                    本博客所有文章除特别声明外，均采用 <a target="_blank" href="https://creativecommons.org/licenses/by-sa/4.0/deed.zh" rel="nofollow noopener noopener">CC BY-SA 4.0 协议</a> ，转载请注明出处！
                  
                </p>
              
              
                <div class="post-prevnext">
                  <article class="post-prev col-6">
                    
                    
                      <a href="/2020/12/09/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84%E8%AF%BE%E8%AE%BE--%E4%BA%A4%E9%80%9A%E5%92%A8%E8%AF%A2%E7%B3%BB%E7%BB%9F%E8%AE%BE%E8%AE%A1/">
                        <i class="iconfont icon-arrowleft"></i>
                        <span class="hidden-mobile">交通咨询系统</span>
                        <span class="visible-mobile">上一篇</span>
                      </a>
                    
                  </article>
                  <article class="post-next col-6">
                    
                    
                      <a href="/2020/12/07/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84%E5%AE%9E%E9%AA%8C--%E5%9B%BE%E7%9A%84%E4%B8%89%E7%A7%8D%E7%AE%97%E6%B3%95%E7%9A%84%E5%90%8C%E6%AD%A5%E6%BC%94%E7%A4%BA/">
                        <span class="hidden-mobile">图的三种算法的同步演示</span>
                        <span class="visible-mobile">下一篇</span>
                        <i class="iconfont icon-arrowright"></i>
                      </a>
                    
                  </article>
                </div>
              
            </div>

            
          </article>
        </div>
      </div>
    </div>
    
      <div class="d-none d-lg-block col-lg-2 toc-container" id="toc-ctn">
        <div id="toc">
  <p class="toc-header"><i class="iconfont icon-list"></i>&nbsp;目录</p>
  <div class="toc-body" id="toc-body"></div>
</div>

      </div>
    
  </div>
</div>

<!-- Custom -->


    

    
      <a id="scroll-top-button" aria-label="TOP" href="#" role="button">
        <i class="iconfont icon-arrowup" aria-hidden="true"></i>
      </a>
    

    
      <div class="modal fade" id="modalSearch" tabindex="-1" role="dialog" aria-labelledby="ModalLabel"
     aria-hidden="true">
  <div class="modal-dialog modal-dialog-scrollable modal-lg" role="document">
    <div class="modal-content">
      <div class="modal-header text-center">
        <h4 class="modal-title w-100 font-weight-bold">搜索</h4>
        <button type="button" id="local-search-close" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body mx-3">
        <div class="md-form mb-5">
          <input type="text" id="local-search-input" class="form-control validate">
          <label data-error="x" data-success="v"
                 for="local-search-input">关键词</label>
        </div>
        <div class="list-group" id="local-search-result"></div>
      </div>
    </div>
  </div>
</div>
    

    
  </main>

  <footer class="text-center mt-5 py-3">
  <div class="footer-content">
     <a href="https://hexo.io" target="_blank" rel="nofollow noopener"><span>Hexo</span></a> <i class="iconfont icon-love"></i> <a href="https://cheney822.gitee.io/" target="_blank" rel="nofollow noopener"><span>备用网址</span></a> 
  </div>
  

  
  <!-- 备案信息 -->
  <div class="beian">
    <span>
      <a href="http://beian.miit.gov.cn/" target="_blank" rel="nofollow noopener">
        皖ICP备2022002876号-1
      </a>
    </span>
    
  </div>


  
</footer>


  <!-- SCRIPTS -->
  
  <script  src="https://cdn.jsdelivr.net/npm/nprogress@0/nprogress.min.js" ></script>
  <link  rel="stylesheet" href="https://cdn.jsdelivr.net/npm/nprogress@0/nprogress.min.css" />

  <script>
    NProgress.configure({"showSpinner":false,"trickleSpeed":100})
    NProgress.start()
    window.addEventListener('load', function() {
      NProgress.done();
    })
  </script>


<script  src="https://cdn.jsdelivr.net/npm/jquery@3/dist/jquery.min.js" ></script>
<script  src="https://cdn.jsdelivr.net/npm/bootstrap@4/dist/js/bootstrap.min.js" ></script>
<script  src="/js/events.js" ></script>
<script  src="/js/plugins.js" ></script>

<!-- Plugins -->


  <script  src="/js/local-search.js" ></script>



  
    <script  src="/js/img-lazyload.js" ></script>
  



  



  
    <script  src="https://cdn.jsdelivr.net/npm/tocbot@4/dist/tocbot.min.js" ></script>
  
  
    <script  src="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3/dist/jquery.fancybox.min.js" ></script>
  
  
    <script  src="https://cdn.jsdelivr.net/npm/anchor-js@4/anchor.min.js" ></script>
  
  
    <script defer src="https://cdn.jsdelivr.net/npm/clipboard@2/dist/clipboard.min.js" ></script>
  






  <script  src="https://cdn.jsdelivr.net/npm/typed.js@2/lib/typed.min.js" ></script>
  <script>
    (function (window, document) {
      var typing = Fluid.plugins.typing;
      var title = document.getElementById('subtitle').title;
      
        typing(title);
      
    })(window, document);
  </script>















<!-- 主题的启动项 保持在最底部 -->
<script  src="/js/boot.js" ></script>


</body>
</html>
